package com.asset.mgt.controller;

import com.asset.mgt.service.OrderAddService;
import jakarta.annotation.Resource;
import org.asset.entity.Order;
import org.asset.until.R;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/order")
public class OrderAddController {

    @Resource
    private OrderAddService orderAddService;

    @RequestMapping("/add")
    public R addOrder(Order order) {
        return orderAddService.addOrder(order);
    }
}
